package com.factory.web.json;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
import java.util.Date;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author milos
 *
 * One possibility for the user. It gives approximatly time when the result will
 * be finished
 */
@XmlRootElement
public class Plan {

    private String userId;
    private String inputId;
    private String problem;
    private int price;
    private String timeAsDate;
    private long plannedFinishTime;
    private long computationTime;
    private long deadline;
    private boolean supported; //default true

    public Plan() {
    }

    public Plan(String userId, String inputId, String problem, int price, String timeAsDate, long plannedFinishTime, long computationTime) {
        this.userId = userId;
        this.inputId = inputId;
        this.problem = problem;
        this.price = price;
        this.timeAsDate = timeAsDate;
        this.plannedFinishTime = plannedFinishTime; //tasku ktore 
        this.computationTime = computationTime;
        deadline = 0; //vypocet co najrychlejsie
        supported = true;
    }

    public Plan(String userId, String problem, String time, int price, String inputId) {
        this.userId = userId;
        this.problem = problem;
        this.timeAsDate = time;
        this.price = price;
        this.inputId = inputId;
    }

    public String getTimeAsDate() {
        return timeAsDate;
    }

    public long getDeadline() {
        return deadline;
    }

    public void setDeadline(long deadline) {
        this.deadline = deadline;
    }

    public void setTimeAsDate(String timeAsDate) {
        this.timeAsDate = timeAsDate;
    }

    public long getPlannedFinishTime() {
        return plannedFinishTime;
    }

    public void setPlannedFinishTime(long plannedFinishTime) {
        this.plannedFinishTime = plannedFinishTime;
    }

    public long getComputationTime() {
        return computationTime;
    }

    public void setComputationTime(long computationTime) {
        this.computationTime = computationTime;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getProblem() {
        return problem;
    }

    public void setProblem(String problem) {
        this.problem = problem;
    }

    public String getInputId() {
        return inputId;
    }

    public void setInputId(String inputId) {
        this.inputId = inputId;
    }

    public String getTime() {
        return timeAsDate;
    }

    public void setTime(String time) {
        this.timeAsDate = time;
    }

    public long getTimeMillis() {
        return plannedFinishTime;
    }

    public void setTimeMillis(long timeMillis) {
        this.plannedFinishTime = timeMillis;
    }

    public boolean isSupported() {
        return supported;
    }

    public void setSupported(boolean supported) {
        this.supported = supported;
    }
    
}